package easy;

import java.util.HashSet;

/**
 * @author admin
 * 1832. 判断句子是否为全字母句
 * 解题思路：将字符串转成大写，然后用一个hashset来保存字母，最后判断hashset的长度是否为26
 */
public class LeeCode1832 {

    public boolean checkIfPangram(String sentence) {

        boolean flag = false;
        String s = sentence.toUpperCase();
        HashSet<Character> set = new HashSet<>();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (!set.contains(s.charAt(i))){
                set.add(s.charAt(i));
            }
        }

        return set.size() == 26;
    }

    public static void main(String[] args) {
        System.out.println(new LeeCode1832().checkIfPangram("thequickbrownfoxjumpsoverthelazydog"));
    }
}
